﻿using System;
using DotNetNuke.Entities.Portals;
using DotNetNuke.Entities.Users;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Search;
using System.Data;

namespace DotNetNuke.Modules.PersonalAssistants
{

    public class PersonalAssistantProfile : IHydratable
    {
        
        #region Private Data Members                  
            private int _moduleId;                      
            private int _entryId;                        
            private DateTime _dateTime;                 
            private string _username;                   
            private string _email;                      
            private string _serviceRequired;            
            private string _paLocation;                 
            private string _locations;                  
            private string _tasks;                      
            private string _taskNotes;                  
            private string _timesAvailable;             
            private string _daysAvailable;              
            private string _hoursPerDay;                
            private string _daysPerWeek;                
            private string _overnightWakingNights;      
            private string _lateNights;                 
            private string _schoolHolidays;             
            private string _termTime;                   
            private string _emergencyCallout;           
            private string _workpatternNotes;           
            private string _drivingLicenceHeld;         
            private string _carOwner;                   
            private string _languages;                  
            private string _skillNotes;                 
            private string _yearsResident;              
            private string _permissionForUK;            
            private string _barredByISA;                
            private string _ecrWilling;                 
            private string _provide2References;         
            private string _referenceNotes;             
            private string _aLittleBitAboutMyself;      
            private string _maleOrFemale;               
            private string _smoker;                     
            private string _meatProducts;               
            private string _publishThisProfile;         
            private string _profileApproved;            
            private DateTime _dateOfPAUpdate;
            private string _isPersonalAssistant;
            private string _deleted;  
      
        #endregion

        #region Public Constructors
        ///<summary>
        /// Default code constructor
        ///</summary>
        public PersonalAssistantProfile()
        {
            //Initalize any needed values
            //_moduleId = 0;                      
            //_entryId = 0;                        
            _dateTime = DateTime.Now;                 
            _username = "";                   
            _email = "";                      
            _serviceRequired = "";            
            _paLocation = " ";                 
            _locations = " ";                  
            _tasks = " ";                      
            _taskNotes = "";                  
            _timesAvailable = " ";             
            _daysAvailable = " ";              
            _hoursPerDay = "1";                
            _daysPerWeek = "1";                
            _overnightWakingNights = "No";      
            _lateNights = "No";                 
            _schoolHolidays = "No";             
            _termTime = "No";                   
            _emergencyCallout = "No";           
            _workpatternNotes = "";           
            _drivingLicenceHeld = "No";         
            _carOwner = "No";                   
            _languages = "No";                  
            _skillNotes = "";                 
            _yearsResident = "";              
            _permissionForUK = "No";            
            _barredByISA = "No";                
            _ecrWilling = "No";                 
            _provide2References = "No";         
            _referenceNotes = "";             
            _aLittleBitAboutMyself = "";      
            _maleOrFemale = "Male";               
            _smoker = "No";                     
            _meatProducts = "No";               
            _publishThisProfile = "No";         
            _profileApproved = "No";
            _dateOfPAUpdate = DateTime.Now;
            _isPersonalAssistant = "";
            _deleted = "No";

        }
        #endregion

        #region Public Properties
                /// <summary>
                /// The unique identifier for an entry
                /// </summary>
                public string Deleted
                {
                    get { return _deleted; }
                    set { _deleted = value; }
                }
                /// <summary>
                /// The unique identifier for an entry
                /// </summary>
                public int EntryId
                {
                    get { return _entryId; }
                    set { _entryId = value; }
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public int ModuleId
                {
                    get { return _moduleId; }
                    set { _moduleId = value; }
                }

                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public DateTime DateTime
                {
                    get { return _dateTime;}
                    set { _dateTime = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string Username
                {
                    get { return _username;}
                    set {_username = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string Email
                {
                    get { return _email;}
                    set {_email = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string ServiceRequired
                {
                    get { return _serviceRequired;}
                    set { _serviceRequired = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string PALocation
                {
                    get { return _paLocation;}
                    set { _paLocation = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string Locations
                {
                    get { return _locations;}
                    set { _locations = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string Tasks
                {
                    get { return _tasks;}
                    set { _tasks = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string TaskNotes
                {
                    get { return _taskNotes;}
                    set { _taskNotes = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string TimesAvailable
                {
                    get { return _timesAvailable;}
                    set {_timesAvailable = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string DaysAvailable
                {
                    get { return _daysAvailable;}
                    set { _daysAvailable = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string HoursPerDay
                {
                    get { return _hoursPerDay;}
                    set { _hoursPerDay = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string DaysPerWeek
                {
                    get { return _daysPerWeek;}
                    set { _daysPerWeek = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string OvernightWakingNights
                {
                    get {return _overnightWakingNights;}
                    set {_overnightWakingNights = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string LateNights
                {
                    get {return _lateNights;}
                    set {_lateNights = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string SchoolHolidays
                {
                    get {return _schoolHolidays;}
                    set {_schoolHolidays = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string TermTime
                {
                    get {return _termTime;}
                    set {_termTime = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string EmergencyCallout
                {
                    get {return _emergencyCallout;}
                    set {_emergencyCallout = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string WorkpatternNotes
                {
                    get {return _workpatternNotes;}
                    set {_workpatternNotes = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string DrivingLicenceHeld
                {
                    get {return _drivingLicenceHeld;}
                    set {_drivingLicenceHeld = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string CarOwner
                {
                    get {return _carOwner;}
                    set {_carOwner = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string Languages
                {
                    get { return _languages;}
                    set { _languages = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string SkillNotes
                {
                    get {return _skillNotes;}
                    set {_skillNotes = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string YearsResident
                {
                    get {return _yearsResident;}
                    set { _yearsResident = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string PermissionForUK
                {
                    get {return _permissionForUK;}
                    set {_permissionForUK = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string BarredByISA
                {
                    get {return _barredByISA;}
                    set {_barredByISA = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string ECRWilling
                {
                    get {return _ecrWilling;}
                    set {_ecrWilling = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string Provide2References
                {
                    get { return _provide2References;}
                    set {_provide2References = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string ReferenceNotes
                { 
                    get { return _referenceNotes;}
                    set { _referenceNotes = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string ALittleBitAboutMyself
                {
                    get {return _aLittleBitAboutMyself;}
                    set {_aLittleBitAboutMyself = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string MaleOrFemale
                {
                    get {return _maleOrFemale;}
                    set {_maleOrFemale = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string Smoker
                {
                    get {return _smoker;}
                    set {_smoker = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string MeatProducts
                {
                    get {return _meatProducts;}
                    set {_meatProducts = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string PublishThisProfile
                {
                    get {return _publishThisProfile;}
                    set {_publishThisProfile = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string ProfileApproved
                {
                    get {return _profileApproved;}
                    set {_profileApproved = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public DateTime DateOfPAUpdate
                {
                    get {return _dateOfPAUpdate;}
                    set {_dateOfPAUpdate = value;}
                }
                /// <summary>
                /// The id of the module in which it is located
                /// </summary>
                public string IsPersonalAssistant
                {
                    get { return _isPersonalAssistant;}
                    set { _isPersonalAssistant = value;}
                }

        #endregion

        #region IHydratable Implementation
        public int KeyID
        {
            get { return _entryId; }
            set { _entryId = value; }
        }

        public void Fill(IDataReader oReader)
        {
            _moduleId = int.Parse(oReader["ModuleId"].ToString());
            _entryId = int.Parse(oReader["EntryId"].ToString());
            _dateTime = DateTime.Parse(oReader["DateTime"].ToString());
            _username = Convert.ToString(oReader["Username"]);
            _email = Convert.ToString(oReader["Email"]);
            _serviceRequired = Convert.ToString(oReader["ServiceRequired"]);
            _paLocation = Convert.ToString(oReader["PALocation"]);
            _locations = Convert.ToString(oReader["Locations"]);
            _tasks = Convert.ToString(oReader["Tasks"]);
            _taskNotes = Convert.ToString(oReader["TaskNotes"]);
            _timesAvailable = Convert.ToString(oReader["TimesAvailable"]);
            _daysAvailable = Convert.ToString(oReader["DaysAvailable"]);
            _hoursPerDay = Convert.ToString(oReader["HoursPerDay"]);
            _daysPerWeek = Convert.ToString(oReader["DaysPerWeek"]);
            _overnightWakingNights = Convert.ToString(oReader["OvernightWakingNights"]);
            _lateNights = Convert.ToString(oReader["LateNights"]);
            _schoolHolidays = Convert.ToString(oReader["SchoolHolidays"]);
            _termTime = Convert.ToString(oReader["TermTime"]);
            _emergencyCallout = Convert.ToString(oReader["EmergencyCallout"]);
            _workpatternNotes = Convert.ToString(oReader["WorkPatternNotes"]);
            _drivingLicenceHeld = Convert.ToString(oReader["DrivingLicenceHeld"]);
            _carOwner = Convert.ToString(oReader["CarOwner"]);
            _languages = Convert.ToString(oReader["Languages"]);
            _skillNotes = Convert.ToString(oReader["SkillNotes"]);
            _yearsResident = Convert.ToString(oReader["YearsResident"]);
            _permissionForUK = Convert.ToString(oReader["PermissionForUK"]);
            _barredByISA = Convert.ToString(oReader["BarredByISA"]);
            _ecrWilling = Convert.ToString(oReader["ECRWilling"]);
            _provide2References = Convert.ToString(oReader["Provide2References"]);
            _referenceNotes = Convert.ToString(oReader["ReferenceNotes"]);
            _aLittleBitAboutMyself = Convert.ToString(oReader["ALittleBitABoutMyself"]);
            _maleOrFemale = Convert.ToString(oReader["MaleOrFemale"]);
            _smoker = Convert.ToString(oReader["Smoker"]);
            _meatProducts = Convert.ToString(oReader["MeatProducts"]);
            _publishThisProfile = Convert.ToString(oReader["PublishThisProfile"]);
            _profileApproved = Convert.ToString(oReader["ProfileApproved"]);
            _dateOfPAUpdate = DateTime.Parse(oReader["DateOfPAUpdate"].ToString());
            _isPersonalAssistant = Convert.ToString(oReader["IsPersonalAssistant"]);


        }
        #endregion


    }
}
